#include "dialogwavesin.h"
#include "ui_dialogwavesin.h"

DialogWaveSin::DialogWaveSin(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::DialogWaveSin)
{
    ui->setupUi(this);
    this->ui->WaveSin->setSpeed(0);
}

DialogWaveSin::~DialogWaveSin()
{
    delete ui;
}

void DialogWaveSin::on_verticalSliderValue_valueChanged(int value)
{
    this->ui->WaveSin->setValue(value/100.);
}

void DialogWaveSin::on_horizontalSliderSpeed_valueChanged(int value)
{
    this->ui->WaveSin->setSpeed(-value/100.);
}

void DialogWaveSin::on_horizontalSliderHeight_valueChanged(int value)
{
    this->ui->WaveSin->setWaveHeight(value/100.0);
}

void DialogWaveSin::on_horizontalSliderDensity_valueChanged(int value)
{
    this->ui->WaveSin->setWaveDensity(value/10.);
}

void DialogWaveSin::on_horizontalSliderPasheDiff_valueChanged(int value)
{
    this->ui->WaveSin->setPhaseDifference(value/100.);
}

void DialogWaveSin::on_horizontalSliderSamples_valueChanged(int value)
{
    this->ui->WaveSin->setSamples(value);
}

void DialogWaveSin::on_radioButton_2_clicked()
{
    this->ui->radioButton_2->setChecked(true);
    this->ui->WaveSin->setBeEllipse(true);
}

void DialogWaveSin::on_radioButton_clicked()
{
    this->ui->radioButton->setChecked(true);
    this->ui->WaveSin->setBeEllipse(false);
}
